<?php $this->load->view('includes/head.php'); ?>
<div class="container">
	<div class="row" id="new-task">
		<div class="col-sm-12">

			<h1> Add New Task </h1>
			<hr>

			<div class="progress progress-striped">
			  <div id="progress" class="progress-bar" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" />
			    <span class="sr-only"></span>
			  </div>
			</div>

			<?php 
				echo form_open('manage/create_task', array('role' => 'form'));
			?>
				
				<div class="form-set">
					
					<div class="form-group">
						<label for="title">Title: 
							<a href="#" data-toggle="popover" rel="popover" data-content="Short Description of you task.">
								<i class="fa fa-question-circle"></i>
							</a>
							</label>
                                                        <input type="text" class="form-control" autofocus name="title" id="title" placeholder="Enter Title" value="<?php echo set_value('title');?>" size="50"/>
					</div>
				
					<div class="form-group">
						<label for="content">Task Description:</label>
						<textarea  class="textarea" name="content" id="desc"></textarea>
					</div>
				

				</div>


				<!--- -============================================================= -->


				<div class="form-set">
					<div class="row">
						<div class="col-sm-4">
							<div class="form-group">
								<label for="date">Date Due: 
									<a href="#" data-toggle="popover" rel="popover" data-content="Select a date the task need to be completed.">
										<i class="fa fa-question-circle"></i>
									</a>
								</label>
								<input type="date" class="form-control" name="date" placeholder="Select Date" />
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label for="status">Status: 
									<a href="#" data-toggle="popover" rel="popover" data-content="Select the status of this task.">
										<i class="fa fa-question-circle"></i>
									</a>
								</label>
								<select class="form-control" placeholder="-Select-" name="status">
								  <option value="1">Not Started</option>
								  <option value="2">In Progress</option>
								  <option value="3">Completed</option>
								</select>

							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label for="priority">Priority: 
									<a href="#" data-toggle="popover" rel="popover" data-content="Select the priority of this task.">
										<i class="fa fa-question-circle"></i>
									</a>
								</label>
								<select class="form-control" placeholder="-Select-" name="priority">
								  <option value="1">Low</option>
								  <option value="2">Medium</option>
								  <option value="3">High</option>
								</select>

							</div>
						</div>
					</div>
				
				</div>



				<!--- -============================================================= -->


				<div class="form-set">


					<div class="row">
						<div class="col-sm-6">

							<div class="form-group">
								<label for="responsible">Responsible: 
									<a href="#" data-toggle="popover" rel="popover" data-content="Multipe Users can be resposible for a task. Please Select the users that will have the responsibility of this particular task.">
										<i class="fa fa-question-circle"></i>
									</a>
								</label>
							</div>
							<div class="form-group">
								<div class="btn-group" id="res" data-toggle="buttons">
									<?php 
										foreach ($users as $user) {
											$id = intval($user->id, 10);
											echo<<<RESPONSIBLE
											<label class="btn btn-default">
												<input type="checkbox" name="responsible[]" value="$id" /> $user->first_name $user->last_name
											</label>
RESPONSIBLE;
										};
									?>

								</div>
							</div>
						
						</div>
						<div class="col-sm-6">

							<div class="form-group">
								<label for="accountable">Accountable: 
									<a href="#" data-toggle="popover" rel="popover" data-content="Only 1 employee can be accountable for any one task.">
										<i class="fa fa-question-circle"></i>
									</a>
								</label>
							</div>
							<div class="form-group">
								<div class="btn-group" id="acc" data-toggle="buttons">
									<?php 
										foreach ($users as $user) {
											$id = intval($user->id, 10);
											echo<<<ACCOUNTABLE
											<label class="btn btn-default">
												<input type="radio" name="accountable[]" value="$id" /> $user->first_name $user->last_name
											</label>
ACCOUNTABLE;
										};
									?>
								</div>
							</div>
						</div>
					</div>
					
				
				</div>


				<!--- -============================================================= -->


				<div class="form-set">
					
					<div class="form-group">
						<label for="consulted">Consulted: 
							<a href="#" data-toggle="popover" rel="popover" data-content="Multipe users can be consulted for a task. Please Select the users that will have the employee will be consulted for this particular task.">
								<i class="fa fa-question-circle"></i>
							</a>
						</label>
					</div>
					<div class="form-group">
						<div class="btn-group" data-toggle="buttons">
							<?php 
								foreach ($users as $user) {
									$id = intval($user->id, 10);
									echo<<<CONSUTED
									<label class="btn btn-default">
										<input type="checkbox" name="consulted[]" value="$id" /> $user->first_name $user->last_name
									</label>
CONSUTED;
								};
							?>
						</div>
					</div>
				
				</div>

				<!--- -============================================================= -->


				<div class="form-set">
					
					<div class="form-group">
						<label for="informed">Informed: 
							<a href="#" data-toggle="popover" rel="popover" data-content="Multipe Users can be informed of a task. Please Select the users that will have the employee will be informed for this particular task.">
								<i class="fa fa-question-circle"></i>
							</a>
						</label>
					</div>
					<div class="form-group">
						<div class="btn-group" data-toggle="buttons">
							<?php 
								foreach ($users as $user) {
									$id = intval($user->id, 10);
									echo<<<INFORMED
									<label class="btn btn-default">
										<input type="checkbox" name="informed[]" value="$id" /> $user->first_name $user->last_name
									</label>
INFORMED;
								};
							?>
						</div>
					</div>
				
				</div>
				
				<hr>
				
				<ul class="pager">
				  <li><button id="prev" class="btn btn-warning"><i class="fa fa-chevron-left white"></i> Prev</button></li>
				  <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
				  <li><button id="next" class="btn btn-success" style="color:#FFF;">Next <i class="fa fa-chevron-right"></i></button></li>
				  <li><button type="submit" id="submit-task" class="btn btn-info">Create</button></li>
				</ul>

			<?php echo form_close(); ?>

		</div>
	</div>
</div>
